import { getwarningList} from '@/api/list'
export default {
  data() {
    return {
      showdetails: false,
      trackerId: '',
      detailsLoading: false,
      detailscontent: {
        detailsList: [],
        detailsCount: 0
      },
      row: {}
    }
  },
  methods:{
    fetchdetailsData(query) {
      this.detailsLoading = true
      getwarningList(query).then(response => {
        if (response && response.body) {
          this.detailscontent = {
            detailsList: response.body.trackerWarningResponseList,
            detailsCount: response.body.count
          }
        }
        this.detailsLoading = false
      })
    },
    changedetailspage(val){
      this.fetchdetailsData({
        pageSize: 5,
        currentPage: val,
        trackerId: this.trackerId
      })
    }
  }
}
